import React, { Component } from "react";
import './detail.scss'
export default class order extends Component {
    componentDidMount(){
        this.randerMap()
    }
  randerMap = () => {
    this.map = new window.BMap.Map("allmap");
    this.map.centerAndZoom('上海',11)
    this.addMapControl();
  };
  //添加地图控件
  addMapControl = () => {
    let map = this.map;
    map.addControl(new window.BMap.ScaleControl({ anchor:window.BMAP_ANCHOR_TOP_RIGHT }));
    map.addControl(
      new window.BMap.NavigationControl({ anchor: window.BMAP_ANCHOR_TOP_RIGHT })
    );
  };
  render() {
    return (
      <div>
        <div id="allmap" className="order-map"></div>
      </div>
    );
  }
}
